import 'package:fish_redux/fish_redux.dart';
import 'package:flutter/material.dart';
import '../MainView/model/main_view_model.dart';

class FixOrderViewState implements Cloneable<FixOrderViewState> {
  FixListItemModel model;

  /// 1  未接单  3 准备入户维修  4 正在维修中  5 完成维修
  String step;
  ScrollController scrollController = ScrollController();

  TextEditingController contentController = TextEditingController();
  List imageList = [];
  String problemContent = '';
  List logList = [];

  @override
  FixOrderViewState clone() {
    return FixOrderViewState()
      ..model = model
      ..problemContent = problemContent
      ..logList = logList
      ..contentController = contentController
      ..scrollController = scrollController
      ..imageList = imageList
      ..step = step;
  }
}

FixOrderViewState initState(Map<String, dynamic> args) {
  FixOrderViewState state = FixOrderViewState()..model = args['model'];
  state.step = state.model.status;
  return state;
}
